package cn.gson.boot.model.pojos;

import javax.persistence.*;
import java.math.BigDecimal;
import java.sql.Timestamp;
import java.util.Objects;

/*回款*/

@Entity
public class Huikuan {
    private int hkId;//回款id
    private Kehu kH;//客户id
    private Timestamp hkTime;//回款时间
    private BigDecimal hkMoney;//回款金额
    private String hkBeizhu;//回款备注
    private String hkSuoyouzhe;//回款所有者
    private Dingdan dingdanByDdId;//订单对象（订单id）
    private String hkFanshi;//回款方式

    private Integer hkQici;//回款期次 hk_qici
    private String hkFapiao;//是否开发票 hk_fapiao

    @Column(name = "hk_qici")
    public Integer getHkQici() {
        return hkQici;
    }

    public void setHkQici(Integer hkQici) {
        this.hkQici = hkQici;
    }

    @Column(name = "hk_fapiao")
    public String getHkFapiao() {
        return hkFapiao;
    }

    public void setHkFapiao(String hkFapiao) {
        this.hkFapiao = hkFapiao;
    }

    @Column(name = "hk_fanshi")
    public String getHkFanshi() {
        return hkFanshi;
    }

    public void setHkFanshi(String hkFanshi) {
        this.hkFanshi = hkFanshi;
    }

    @Id
    @Column(name = "hk_id", nullable = false)
    @GeneratedValue(strategy = GenerationType.IDENTITY,generator = "seq")
    public int getHkId() {
        return hkId;
    }

    public void setHkId(int hkId) {
        this.hkId = hkId;
    }

    @ManyToOne
    @JoinColumn(name = "k_id", referencedColumnName = "k_id")
    public Kehu getkH() {
        return kH;
    }

    public void setkH(Kehu kH) {
        this.kH = kH;
    }



    @Basic
    @Column(name = "hk_time", nullable = false)
    public Timestamp getHkTime() {
        return hkTime;
    }

    public void setHkTime(Timestamp hkTime) {
        this.hkTime = hkTime;
    }

    @Basic
    @Column(name = "hk_money", nullable = true, precision = 2)
    public BigDecimal getHkMoney() {
        return hkMoney;
    }

    public void setHkMoney(BigDecimal hkMoney) {
        this.hkMoney = hkMoney;
    }

    @Basic
    @Column(name = "hk_suoyouzhe", nullable = true, length = 200)
    public String getHkSuoyouzhe() {
        return hkSuoyouzhe;
    }

    public void setHkSuoyouzhe(String hkSuoyouzhe) {
        this.hkSuoyouzhe = hkSuoyouzhe;
    }

    @Basic
    @Column(name = "hk_beizhu", nullable = true, length = 200)
    public String getHkBeizhu() {
        return hkBeizhu;
    }

    public void setHkBeizhu(String hkBeizhu) {
        this.hkBeizhu = hkBeizhu;
    }

    @ManyToOne
    @JoinColumn(name = "dd_id", referencedColumnName = "dd_id")
    public Dingdan getDingdanByDdId() {
        return dingdanByDdId;
    }

    public void setDingdanByDdId(Dingdan dingdanByDdId) {
        this.dingdanByDdId = dingdanByDdId;
    }
}
